#!/bin/bash
lines=25
opt_debug=false
while getopts "g" opt
do
	case $opt in
	g)
		echo "enable debnug"
        opt_debug=true
		;;
	?)
		echo "not support args"
        exit 1
	esac
done


tail -n +$lines $0 > /tmp/test.tar.gz
tar -zxf /tmp/test.tar.gz -C /tmp
sudo cp /tmp/rootfs/liuj.out /usr/bin
if [ $opt_debug == false ]; then
    rm -rf /tmp/test.tar.gz /tmp/rootfs
fi
exit 0
